home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-12-08 | 539 b | 26 lines | [TEXT/JEFF] |
- 00 NOOP THIS PROGRAM CALCULATES THE GCD OF TWO INTEGERS.
- 01 NOOP -----------------------------------------------
- 02 ILIT 2345
- 03 ILIT 250 PUSH THE TWO INTEGERS.
- 04 DUPL
- 05 LOAD 0 0
- 06 EQUL TEST WHETHER THE TWO NUMBERS ARE EQUAL
- 07 BRTR 22
- 08 DUPL
- 09 LOAD 0 0
- 10 GRTR TEST WHETHER B>A IS TRUE
- 11 BRTR 17
- 12 LOAD 0 0
- 13 LOAD 0 1
- 14 SUB
- 15 STOR 0 0 STORE A - B IN A SINCE A>B
- 16 BUNC 04
- 17 DUPL
- 18 LOAD 0 0
- 19 SUB
- 20 STOR 0 1 STORE B-A IN B SINCE B>A
- 21 BUNC 04
- 22 WRIT 0 0
- 23 STOP
- DUMP
-